import { useRouter, useRoute } from "vue-router";
import { useStore as useTagsStore } from "@/store/tags";
import { reactive } from "vue";
export default () => {
  const route = useRoute();
  const router = useRouter();
  const tagsStore = useTagsStore();
  const navigator = reactive({
    route,
    ...router,
    back: () => {
      tagsStore.removeTagSimple(route.name);
      router.go(-1);
    }
  });
  return navigator;
}